import request from '@/utils/request'

//优惠券列表
export function getCouponList(params) {
  return request({
    url:'/shop/coupon/list',
    method:'get',
    params:params
  })
}

//新增编辑优惠券
export function couponEdit(data) {
  return request({
    url:'/shop/coupon/edit',
    method:'post',
    data:data
  })
}

//商家优惠券详情
export function getCouponDetail(params) {
  return request({
    url:'/shop/coupon/detail',
    method:'get',
    params:params
  })
}

//优惠券领取记录列表
export function getCouponTakeList(params) {
  return request({
    url:'/shop/couponTake/list',
    method:'get',
    params:params
  })
}

//优惠券上下架
export function postCouponStatus(data) {
  return request({
    url:'/shop/coupon/close',
    method:'post',
    data:data
  })
}

//优惠券活动列表
export function postcouponActivityList(params) {
  return request({
    url:'/shop/couponActivity/list',
    method:'get',
    params:params
  })
}

//优惠券活动详情
export function getCouponActivityInfo(params) {
  return request({
    url:'/shop/couponActivity/detail',
    method:'get',
    params:params
  })
}


//优惠券活动编辑新增
export function couponActivityInfoEdit(data) {
  return request({
    url:'/shop/couponActivity/edit',
    method:'post',
    data:data
  })
}



